Get Person Details by Code
http://{supOS ip:port}/open-api/organization/v2/persons/{personCode}
Accept-Language: Default is the server language. Options are en-us and zh-cn.
- 200: Successful.
{
"code": "zhangsan",
"name": "Zhangsan",
"valid": 1,
"gender": {
"code": "male",
"name": "Male"
},
"status": {
"code": "onWork",
"name": "On post"
},
"mainPosition": {
"code": "developPosition",
"name": "R&D"
},
"entryDate": "2021-05-28",
"title": {
"code": "primary",
"name": "Primary"
},
"qualification": "string",
"education": {
"code": "doctor",
"name": "Doctor"
},
"major": "IT",
"idNumber": "130971199809121011",
"departments": [
{
"name": "Tech department",
"code": "tecDept"
}
],
"companies": [
{
"name": "Tech company",
"code": "tecCom"
}
],
"user": {
"username": "zhangsan"
},
"positions": [
{
"name": "Tech post",
"code": "tecPos"
}
],
"modifyTime": "2021-01-26T16:02:15.666+0000"
}
- 400
{
"code": 100104020,
"message": "specified person does not exist"
}
Get Company Details by Code
http://{supOS ip:port}/open-api/organization/v2/companies/{companyCode}
Accept-Language: Default is the server language. Options are en-us and zh-cn.
- 200: Successful.
{
"code": "developCompany",
"parentCode": "defualt_company",
"fullName": "Hangzhou R&D company",
"shortName": "R&D company",
"description": "A R&D company located in Hangzhou",
"tags": [
"develop",
"hangzhou"
],
"fullPath": "/group/R&D",
"layNo": 2,
"sort": 678.23,
"valid": 1,
"modifyTime": "2021-01-26T16:02:15.666+0000"
}
- 400
{
"code": 100104040,
"message": "company does not exist"
}
Get Persons by Company Code
http://{supOS ip:port}/open-api/organization/v2/companies/{companyCode}/persons
- current: Required integer. Current page number, starting from 1.
- pageSize: Integer. Items on the page.
Accept-Language: Default is the server language. Options are en-us and zh-cn.
- 200: Successful.
{
"list": [
{
"code": "zhangsan",
"name": "Zhangsan",
"valid": 1,
"gender": {
"code": "male",
"name": "Male"
},
"status": {
"code": "onWork",
"name": "On post"
},
"mainPosition": {
"code": "developPosition",
"name": "R&D"
},
"entryDate": "2021-05-28",
"title": {
"code": "primary",
"name": "Primary"
},
"qualification": "string",
"education": {
"code": "doctor",
"name": "Doctor"
},
"major": "IT",
"idNumber": "130971199809121011",
"departments": [
{
"name": "Tech department",
"code": "tecDept"
}
],
"companies": [
{
"name": "Tech company",
"code": "tecCom"
}
]
}
],
"pagination": {
"total": 1,
"pageSize": 20,
"current": 1
}
}
- 400
{
"code": 100000003,
"message": "'current' cannot be smaller than 1"
}
- 100000003: 'pageSize' cannot be smaller than 1!
- 100000003: 'pageSize' cannot be larger than 500!
- 100104040: Company does not exist.
Get Post Details by Code
http://{supOS ip:port}/open-api/organization/v2/positions/{positionCode}
Accept-Language: Default is the server language. Options are en-us and zh-cn.
- 200: Successful.
{
"parentCode": "technologyPosition",
"code": "developPosition",
"name": "R&D",
"valid": 1,
"modifyTime": "2021-01-26T16:02:15.666+0000",
"department": {
"code": "tecDep",
"name": "Tech department"
},
"company": {
"code": "tecCompany",
"shortName": "Tech company",
"fullName": "Hangzhou R&D company"
},
"description": "R&D position in Hangzhou R&D company",
"fullPath": "/tech post/R&D",
"layNo": 2,
"sort": 678.23,
"roles": [
{
"name": "system admin",
"code": "systemRole"
}
]
}
- 400
{
"code": 100104013,
"message": "specified post does not exist"
}
- 100000003: pageSize cannot be smaller than 1!
- 100000003: pageSize cannot be larger than 500!
- 100104040: Company does not exist.
Get Persons by Post
http://{supOS ip:port}/open-api/organization/v2/positions/{positionCode}/persons
- current: Required integer. Current page number, starting from 1.
- pageSize: Integer. Items on the page.
Accept-Language: Default is the server language. Options are en-us and zh-cn.
- 200: Successful.
{
"list": [
{
"code": "zhangsan",
"name": "Zhangsan",
"valid": 1,
"gender": {
"code": "male",
"name": "Male"
},
"status": {
"code": "onWork",
"name": "On post"
},
"mainPosition": {
"code": "developPosition",
"name": "R&D"
},
"entryDate": "2021-05-28",
"title": {
"code": "primary",
"name": "Primary"
},
"qualification": "string",
"education": {
"code": "doctor",
"name": "Doctor"
},
"major": "IT",
"idNumber": "130971199809121011",
"departments": [
{
"name": "Tech department",
"code": "tecDept"
}
],
"companies": [
{
"name": "Tech company",
"code": "tecCom"
}
]
}
],
"pagination": {
"total": 1,
"pageSize": 20,
"current": 1
}
}
- 400
{
"code": 100000003,
"message": "'current' cannot be smaller than 1"
}
- 100000003: 'pageSize' cannot be smaller than 1!
- 100000003: 'pageSize' cannot be larger than 500!
- 100104013: Specified post does not exist.
Get Department Details by Code
http://{supOS ip:port}/open-api/organization/v2/departments/{departmentCode}
Accept-Language: Default is the server language. Options are en-us and zh-cn.
- 200: Successful.
{
"parentCode": "technologyDepartment",
"code": "developDepartment",
"name": "R&D",
"deptType": {
"code": "general",
"name": "General"
},
"description": "R&D department in Hangzhou R&D company",
"fullPath": "/tech department/R&D",
"layNo": 2,
"sort": 678.23,
"valid": 1,
"modifyTime": "2021-01-26T16:02:15.666+0000",
"company": {
"code": "tecCompany",
"shortName": "R&D company",
"fullName": "Hangzhou R&D company"
},
"managers": [
{
"name": "Lisi",
"code": "lisi"
}
],
"positions": [
{
"name": "developPosition",
"code": "R&D postistion"
}
]
}
- 400
{
"code": 100104004,
"message": "specified department does not exist"
}
Get Persons by Department
http://{supOS ip:port}/open-api/organization/v2/departments/{departmentCode}/persons
- current: Required integer. Current page number, starting from 1.
- pageSize: Integer. Items on the page.
Accept-Language: Default is the server language. Options are en-us and zh-cn.
- 200: Successful.
{
"list": [
{
"code": "zhangsan",
"name": "Zhangsan",
"valid": 1,
"gender": {
"code": "male",
"name": "Male"
},
"status": {
"code": "onWork",
"name": "On post"
},
"mainPosition": {
"code": "developPosition",
"name": "R&D"
},
"entryDate": "2021-05-28",
"title": {
"code": "primary",
"name": "Primary"
},
"qualification": "string",
"education": {
"code": "doctor",
"name": "Doctor"
},
"major": "IT",
"idNumber": "130971199809121011",
"departments": [
{
"name": "Tech department",
"code": "tecDept"
}
],
"companies": [
{
"name": "Tech company",
"code": "tecCom"
}
]
}
],
"pagination": {
"total": 1,
"pageSize": 20,
"current": 1
}
}
- 400
{
"code": 100000003,
"message": "'current' cannot be smaller than 1"
}
- 100000003: 'pageSize' cannot be smaller than 1!
- 100000003: 'pageSize' cannot be larger than 500!
- 100104004: Specified department does not exist.
Get Company List
http://{supOS ip:port}/open-api/organization/v2/companies
- current: Required integer. Current page number, starting from 1.
- pageSize: Integer. Items on the page.
- modifyTime: The lastest modify time. Format is yyyy-MM-dd'T'HH:mm:ss.SSSZ.
Accept-Language: Default is the server language. Options are en-us and zh-cn.
- 200: Successful.
{
"list": [
{
"code": "developCompany",
"parentCode": "defualt_company",
"fullName": "Hangzhou R&D company",
"shortName": "R&D company",
"description": "A R&D company located in Hangzhou",
"tags": [
"develop",
"hangzhou"
],
"fullPath": "/group/R&D",
"layNo": 2,
"sort": 678.23,
"valid": 1,
"modifyTime": "2021-01-26T16:02:15.666+0000"
}
],
"pagination": {
"total": 1,
"pageSize": 20,
"current": 1
}
}
- 400
{
"code": 100000003,
"message": "'current' cannot be smaller than 1"
}
- 100000003: 'pageSize' cannot be smaller than 1!
- 100000003: 'pageSize' cannot be larger than 500!
- 1001040377: Date format error.
Get Department List
http://{supOS ip:port}/open-api/organization/v2/departments
- current: Required integer. Current page number, starting from 1.
- pageSize: Integer. Items on the page.
- modifyTime: The lastest modify time. Format is yyyy-MM-dd'T'HH:mm:ss.SSSZ.
Accept-Language: Default is the server language. Options are en-us and zh-cn.
- 200: Successful.
{
"list": [
{
"parentCode": "technologyDepartment",
"code": "developDepartment",
"name": "R&D",
"deptType": {
"code": "general",
"name": "General"
},
"description": "R&D department in Hangzhou R&D company",
"fullPath": "/tech department/R&D",
"layNo": 2,
"sort": 678.23,
"valid": 1,
"modifyTime": "2021-01-26T16:02:15.666+0000",
"company": {
"code": "tecCompany",
"shortName": "R&D company",
"fullName": "Hangzhou R&D company"
},
"managers": [
{
"name": "Lisi",
"code": "lisi"
}
]
}
],
"pagination": {
"total": 1,
"pageSize": 20,
"current": 1
}
}
- 400
{
"code": 100000003,
"message": "'current' cannot be smaller than 1"
}
- 100000003: 'pageSize' cannot be smaller than 1!
- 100000003: 'pageSize' cannot be larger than 500!
- 1001040377: Date format error.
Get Post List
http://{supOS ip:port}/open-api/organization/v2/positions
- current: Required integer. Current page number, starting from 1.
- pageSize: Integer. Items on the page.
- modifyTime: The lastest modify time. Format is yyyy-MM-dd'T'HH:mm:ss.SSSZ.
Accept-Language: Default is the server language. Options are en-us and zh-cn.
- 200: Successful.
{
"list": [
{
"parentCode": "technologyPosition",
"code": "developPosition",
"name": "R&D",
"valid": 1,
"modifyTime": "2021-01-26T16:02:15.666+0000",
"department": {
"code": "tecDep",
"name": "Tech department"
},
"company": {
"code": "tecCompany",
"shortName": "R&D company",
"fullName": "Hangzhou R&D company"
},
"description": "R&D post in Hangzhou R&D company",
"fullPath": "/tech position/R&D",
"layNo": 2,
"sort": 678.23
}
],
"pagination": {
"total": 1,
"pageSize": 20,
"current": 1
}
}
- 400
{
"code": 100000003,
"message": "'current' cannot be smaller than 1"
}
- 100000003: 'pageSize' cannot be smaller than 1!
- 100000003: 'pageSize' cannot be larger than 500!
- 1001040377: Date format error.
Get Person List
http://{supOS ip:port}/open-api/organization/v2/persons
- current: Required integer. Current page number, starting from 1.
- pageSize: Integer. Items on the page.
- modifyTime: The lastest modify time. Format is yyyy-MM-dd'T'HH:mm:ss.SSSZ.
Accept-Language: Default is the server language. Options are en-us and zh-cn.
- 200: Successful.
{
"list": [
{
"code": "zhangsan",
"name": "Zhangsan",
"valid": 1,
"gender": {
"code": "male",
"name": "Male"
},
"status": {
"code": "onWork",
"name": "On post"
},
"mainPosition": {
"code": "developPosition",
"name": "R&D"
},
"entryDate": "2021-05-28",
"title": {
"code": "primary",
"name": "Primary"
},
"qualification": "string",
"education": {
"code": "doctor",
"name": "Doctor"
},
"major": "IT",
"idNumber": "130971199809121011",
"departments": [
{
"name": "Tech department",
"code": "tecDept"
}
],
"companies": [
{
"name": "Tech company",
"code": "tecCom"
}
],
"user": {
"username": "zhangsan"
},
"positions": [
{
"name": "Tech post",
"code": "tecPos"
}
],
"modifyTime": "2021-01-26T16:02:15.666+0000"
}
],
"pagination": {
"total": 1,
"pageSize": 20,
"current": 1
}
}
- 400
{
"code": 100000003,
"message": "'current' cannot be smaller than 1"
}
- 100000003: 'pageSize' cannot be smaller than 1!
- 100000003: 'pageSize' cannot be larger than 500!
- 1001040377: Date format error.
Get Department List by Company
http://{supOS ip:port}/open-api/organization/v2/companies/{companyCode}/departments
- username: When it is not empty, departments the user is linked with are returned.
- current: Required integer. Current page number, starting from 1.
- pageSize: Integer. Items on the page.
Accept-Language: Default is the server language. Options are en-us and zh-cn.
- 200: Successful.
{
"list": [
{
"parentCode": "technologyDepartment",
"code": "developDepartment",
"name": "R&D",
"deptType": {
"code": "general",
"name": "General"
},
"description": "R&D department in Hangzhou R&D company",
"fullPath": "/tech department/R&D",
"layNo": 2,
"sort": 678.23,
"valid": 1,
"modifyTime": "2021-01-26T16:02:15.666+0000",
"company": {
"code": "tecCompany",
"shortName": "R&D company",
"fullName": "Hangzhou R&D company"
},
}
],
"pagination": {
"total": 1,
"pageSize": 20,
"current": 1
}
}
- 400
{
"code": 100000003,
"message": "'current' cannot be smaller than 1"
}
- 100000003: 'pageSize' cannot be smaller than 1!
- 100000003: 'pageSize' cannot be larger than 500!
- 100104040: Company does not exist.
- 100104050: User does not exist under the company.
Get Post List by Company
http://{supOS ip:port}/open-api/organization/v2/companies/{companyCode}/positions
- current: Required integer. Current page number, starting from 1.
- pageSize: Integer. Items on the page.
Accept-Language: Default is the server language. Options are en-us and zh-cn.
- 200: Successful.
{
"list": [
{
"parentCode": "technologyPosition",
"code": "developPosition",
"name": "R&D",
"department": {
"code": "developDept",
"name": "R&D department"
},
"valid": 1,
"company": {
"code": "tecCompany",
"shortName": "R&D company",
"fullName": "Hangzhou R&D company"
},
"fullPath": "/tech position/R&D"
}
],
"pagination": {
"total": 1,
"pageSize": 20,
"current": 1
}
}
- 400
{
"code": 100000003,
"message": "'current' cannot be smaller than 1"
}
- 100000003: 'pageSize' cannot be smaller than 1!
- 100000003: 'pageSize' cannot be larger than 500!
- 100104040: Company does not exist.
Add, Edit and Delete Person in Batches
http://{supOS ip:port}/open-api/organization/v2/persons/bulk
{
"addPersons": [
{
"code": "zhaoyi", //required
"name": "Zhaoyi", //required
"phone": 15219809782,
"gender": "male", //required
"status": "onWork", //required
"email": "zhaoyi@163.com",
"description": "My name is Zhaoyi",
"directLeaderCode": "dbManager",
"grandLeaderCode": "depManager",
"entryDate": "2021-01-26",
"title": "elementary",
"qualification": null,
"education": "middleOrOther",
"major": "IT",
"idNumber": 130971199809121010,
"mainPositionCode": "developPosition" //required
},
{
"code": "qianer",
"name": "Qianer",
"phone": null,
"gender": "male",
"status": "onWork",
"email": null,
"description": null,
"directLeaderCode": null,
"grandLeaderCode": null,
"entryDate": null,
"title": null,
"qualification": null,
"education": null,
"major": null,
"idNumber": null,
"mainPositionCode": "developPosition"
}
],
"updatePersons": [
{
"code": "sunsan", //required
"name": "Sunsan", //required
"phone": 13738374659,
"gender": "male", //required
"status": "onWork", //required
"email": "sunsan@163.com",
"description": "Sunsan is a R&D engineer",
"directLeaderCode": "dbManager",
"grandLeaderCode": "depManager",
"entryDate": "2021-05-26",
"title": "intermediate",
"qualification": null,
"education": "hd",
"major": "Computer information",
"idNumber": 189746287423231,
"mainPositionCode": "developPosition" //required
},
{
"code": "lisi",
"name": "Lisi",
"phone": null,
"gender": "male",
"status": "onWork",
"email": null,
"description": null,
"directLeaderCode": null,
"grandLeaderCode": null,
"entryDate": null,
"title": null,
"qualification": null,
"education": null,
"major": null,
"idNumber": null,
"mainPositionCode": "developPosition"
}
],
"deletePersons": [
"wangwu",
"zhaoliu"
]
}
- gender: System code is sys_gender: male/female.
- status: System code is sys_person_status: onWork/offWork.
- title: System code is sys_title: elementary/intermidiate/advanced.
- education: System code is sys_education: middleOrOther/highSecondary/degree/college/master/phd.
Accept-Language: Default is the server language. Options are en-us and zh-cn.
- 200: Successful.
- 400
{
"code": 1001040393,
"message": "person code is required, cannot be empty. It must a combination of letter, number and underscore, with length less than 50."
}
Error Type | Error Code | Message |
---|---|---|
Common errors for personnel addition and modification | 1001040393 | Person code is required, cannot be empty, and must be a combination of letters, numbers, and underscores, with a length not exceeding 50! |
1001040394 | Person name is required, cannot be empty, and must be no more than 200 characters in length! | |
1001040395 | Person gender is required and cannot be empty! | |
1001040396 | Person status is required and cannot be empty! | |
1001040397 | Main position is required and cannot be empty! | |
1001040398 | Description cannot be more than 500 characters in length! | |
1001040399 | ID card number is composed of numbers, uppercase and lowercase letters, and special characters, with a length not exceeding 200 characters! | |
1001040400 | ID card number cannot be duplicated! | |
1001040385 | Direct leader does not exist! | |
1001040386 | Grand leader does not exist! | |
1001040389 | Gender system code is incorrect! | |
1001040390 | Person status system code is incorrect! | |
1001040391 | Title system code is incorrect! | |
1001040392 | Education system code is incorrect! | |
100104019 | The specified position does not exist! | |
Unique errors for personnel addition | 100104021 | Person number already exists! |
1001040384 | Duplicate person codes! | |
Specific errors for personnel modification | 100104020 | The specified person does not exist! |
Specific errors for personnel deletion | 1001040376 | Failed to delete user! |
Set Person Icon by Code
http://{supOS ip:port}/open-api/organization/v2/persons/{personCode}/image
imageType: Required string. For example: imageType=avatar.
fileName
- 200: Successful.
- 400
{
"code": 1001040379,
"message": "person icon format error"
}
- 1001040387: 'imageType' error.
- 100104020: Specified person does not exist.